package cn.jiyun.Service.impl;

import cn.jiyun.dao.Udao;
import cn.jiyun.pojo.Day3;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class Uservice implements cn.jiyun.Service.Uservice {

    @Autowired
    private Udao udao;



    @Override
    public List<Day3> findall() {
        return udao.selectList(null);
    }

    @Override
    public Day3 hx(Integer id) {
        return udao.selectById(id);
    }

    @Override
    public void del(Integer id) {
     Day3 day3=new Day3();
     day3.setId(id);
     day3.setZt("1");
     udao.updateById(day3);
    }

    @Override
    public void add(Day3 day3) {
        day3.setId(0);
        udao.insert(day3);
//        udao.add(day3);

    }

    @Override
    public void update(Day3 day3) {
        udao.updateById(day3);
    }

    @Override
    public Page<Day3> fy(Page<Day3> pp, QueryWrapper<Day3> queryWrapper) {
        return udao.selectPage(pp,queryWrapper);
    }


}
